<template>
	<view class="container">
		<view class="ntitle">{{news.ntitle}}</view>
		<view class="subtitle">
			<text>来源：{{news.nfrom}}</text>
			<text>日期：{{news.ndate}}</text>
			<text>作者：管理员</text>
			<text>阅读数：{{news.nhit}}</text>
		</view>
		<view class="ncontent" v-html="news.ncontent">
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				news: {}
			}
		},
		onLoad(option) {
			console.log(option.nid);
			let nid = option.nid;
			this.$request({
				url: '/news/' + nid,
				success:(res) => {
					this.news = res.data
				}
			})
		},
		methods: {

		}
	}
</script>

<style>
	page {
		background: #F8F8FF;
	}

	.container {
		margin: 16rpx;
		background-color: white;
	}

	.ntitle {
		text-align: center;
		display: block;
		line-height: 100rpx;
		font-size: 48rpx;
		border-bottom: 1px solid #ccc;
	}

	.subtitle {
		display: flex;
		flex-direction: row;
		font-size: 22rpx;
		line-height: 60rpx;
		color: #666;
		justify-content: space-around;
	}

	.ncontent {
		padding: 24rpx;
		font-size: 40rpx;
		line-height: 64rpx;
		text-indent: 2em;
	}
</style>